
#if !defined _FLYNODE_H 
#define _FLYNODE_H

#include "PathNode.h"
#include "CtlParaNode.h"
#include "ModelNode.h"

#define GSSAVENUM 10

#include "..\helisys\heli_sys_define\FlyStructDefine.h"

#define GSFlyData FlyState

class CFlyNode  
{
public:
	
	GSFlyData * GetFlyDataBlock(long serial);
	CFlyNode();
	virtual ~CFlyNode();
	void Close();
	bool Makehead(CModelNode * m ,CCtlParaNode *cp,CString filepath);
	bool LoadHead(CString filepath);
	bool OpenForWrite(CString filepath);
	bool OpenForRead(CString filepath);
	bool PushFlydata(GSFlyData * v);
	CPathNode used_path;
	CCtlParaNode used_controlPara;
	CModelNode used_model;

	int sel;
	GSFlyData buf1[GSSAVENUM];
	GSFlyData buf2[GSSAVENUM];
	long buf1pos;
	long buf2pos;
	CString name;
	CFile  fp;
	bool opentag;
	long head_over_pos;
	long read_current;
	bool read_opened;
	bool write_opened;
	GSFlyData * retget;
};

#endif
